﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using ColladaDotNet;
using ColladaDotNet.Geometry;

namespace BakalarskaPraca.Generation.Data
{
    [Serializable]
    public class ProjectData : ModelData
    {
        public void SaveProject(string filePath)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(ProjectData)); 
            var writer = new StreamWriter(filePath);
            serializer.Serialize(writer, this);
        }

        public static ProjectData LoadProject(string filePath)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(ProjectData));
            var reader = new StreamReader(filePath);
            return serializer.Deserialize(reader) as ProjectData;
        }
    }
}
